#lang racket

(define (fringe xs)
  (cond ((null? xs) '())
        ((not (pair?(car xs))) (cons (car xs) (fringe (cdr xs))))
        (else (append (fringe (car xs)) (fringe (cdr xs))))))

(define x (list (list 1 2) (list 3 4)))

(fringe x)

(fringe (list x x))